﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MsTestUtilities.RowTests;
using T4Utilities;

namespace T4UtilitiesTests.StringExtensionTests
{
    [TestClass]
    public class CapitalizeTests
    {
        [TestMethod]
        public void FirstCharacterShouldBeUpperCase()
        {
            new TestScenarioBuilder<string, string>()
                .For(StringExtensions.Capitalize)
                .Given(null).ExpectTheSame().Because("Null cannot be capitalized.")
                .Given("").ExpectTheSame().Because("Empty string cannot be capitalized.")
                .Given("Hej").ExpectTheSame().Because("String is already capitalized.")
                .Given("h").Expect("H").Because("First character should be upper case.")
                .Given("hej").Expect("Hej").Because("Other characters are not put in upper case.")
                .Given(" hej").ExpectTheSame().Because("Because space has no upper case.")
                .Evaluate();
        }
    }
}
